<div class="page-products stock-product">
	
    <div class="product-header clearfix">
		<i class="icon icon-back" ng-click="back()"></i>
        我的送货单
	</div>

	<div class="order-header manager-tab clearfix">
		<a href="javascript:void(0);" ng-click="switchTab('send')" class="order-tab-title" ng-class="{'selected':selection.tab == 'send'}">待配送</a>
		<a href="javascript:void(0);" ng-click="switchTab('sign')" class="order-tab-title" ng-class="{'selected':selection.tab == 'sign'}">待签收</a>
		<a href="javascript:void(0);" ng-click="switchTab('reject')" class="order-tab-title" ng-class="{'selected':selection.tab == 'reject'}">已拒收</a>
		<a href="javascript:void(0);" ng-click="switchTab('over')" class="order-tab-title" ng-class="{'selected':selection.tab == 'over'}">已签收</a>
		<a href="javascript:void(0);" ng-click="switchTab('search')" class="order-tab-title" ng-class="{'selected':selection.tab == 'search'}">筛选</a>
	</div>
    
    <div class="orderlist-wrap" style="padding-top:50px;" ng-if="selection.tab != 'search'">
    	
		<div class="monitor-win" ng-repeat="out in outList[selection.tab]">
			<p>
				<span style="position:absolute;right:6%;">
					<a ng-if="out.status != 4 && out.status != -1" style="margin:2px 80px;" class="destory-btn" href="javascript:void(0);" ng-click="checkReject(out.out_id,out.refer_id)">拒收</a>
					<a ng-if="out.status == 2" style="margin:2px 2px;" class="recharge-btn" href="javascript:void(0);"  ng-click="checkSend(out.out_id,out.refer_id)">配送</a>
					<a ng-if="out.status == 3" style="margin:2px 2px;" class="receive-btn" href="javascript:void(0);" ng-click="checkSign(out.out_id,out.refer_id)">签收</a>
           		</span>
			</p>
            <table class="tab_table" style="clear:both;">
				<tr>
					<td class="t_title">出库单号：</td>
					<td colspan="3">{{out.out_id}}</td>
				</tr>
				<tr>
					<td class="t_title">相关订单：</td>
					<td colspan="3">{{out.refer_id}}</td>
				</tr>
				<tr>
					<td class="t_title" style="vertical-align:top;">发货仓库：</td>
					<td colspan="3">{{out.warehouse}}</td>
				</tr>
				<tr>
					<td class="t_title" style="vertical-align:top;">收货超市：</td>
					<td colspan="3">{{out.shipping_company}}</td>
				</tr>
                <tr>
					<td class="t_title" style="vertical-align:top;">收货地址：</td>
					<td colspan="3">{{out.shipping_address}}</td>
				</tr>
				<tr>
					<td class="t_title">收货人：</td>
					<td>{{out.fullname}}</td>
                    <td class="t_title">收货电话：</td>
					<td>{{out.telephone}}</td>
				</tr> 
				<tr>
					<td class="t_title">订单状态：</td>
					<td>{{out.o_state}}</td>
					<td class="t_title">出库状态：</td>
					<td>{{out.so_state}}</td>
				</tr>
			</table>
    	</div>
        
        <div class="no-orders" ng-if="!outList[selection.tab] || outList[selection.tab].length<1">没有查询到任何单据...</div>
		<div class="loading" id="LoadingPlace"></div>
    
    </div>
   	
    <!--筛选--> 
    <div class="orderlist-wrap" style="padding-top:50px;" ng-if="selection.tab == 'search'">
    	
        <div class="monitor-win" ng-repeat="out in searchList">
			<p>
				<span style="position:absolute;right:6%;">
					<a ng-if="out.status != 4 && out.status != -1" style="margin:2px 80px;" class="destory-btn" href="javascript:void(0);" ng-click="checkReject(out.out_id,out.refer_id)">拒收</a>
					<a ng-if="out.status == 2" style="margin:2px 2px;" class="recharge-btn" href="javascript:void(0);"  ng-click="checkSend(out.out_id,out.refer_id)">配送</a>
					<a ng-if="out.status == 3" style="margin:2px 2px;" class="receive-btn" href="javascript:void(0);" ng-click="checkSign(out.out_id,out.refer_id)">签收</a>
           		</span>
			</p>
            <table class="tab_table" style="clear:both;">
				<tr>
					<td class="t_title">出库单号：</td>
					<td colspan="3">{{out.out_id}}</td>
				</tr>
				<tr>
					<td class="t_title">相关订单：</td>
					<td colspan="3">{{out.refer_id}}</td>
				</tr>
				<tr>
					<td class="t_title" style="vertical-align:top;">发货仓库：</td>
					<td colspan="3">{{out.warehouse}}</td>
				</tr>
				<tr>
					<td class="t_title" style="vertical-align:top;">收货超市：</td>
					<td colspan="3">{{out.shipping_company}}</td>
				</tr>
                <tr>
					<td class="t_title" style="vertical-align:top;">收货地址：</td>
					<td colspan="3">{{out.shipping_address}}</td>
				</tr>
				<tr>
					<td class="t_title">收货人：</td>
					<td>{{out.fullname}}</td>
                    <td class="t_title">收货电话：</td>
					<td>{{out.telephone}}</td>
				</tr> 
				<tr>
					<td class="t_title">订单状态：</td>
					<td>{{out.o_state}}</td>
					<td class="t_title">出库状态：</td>
					<td>{{out.so_state}}</td>
				</tr>
			</table>
    	</div>
            
        <div class="no-orders" ng-if="searchList.length<1">没有查询到任何单据...</div>
        
    </div>
    <!--筛选-->
    
    <!--筛选弹出-->
	<div class="filter-panel" ng-class="{'show':showSearchFlag}" style="position:fixed;">
		<div class="top-bar clearfix">
			<span class="text">筛选</span>
			<a class="btn-filter search-stock-btn" href="javascript:void(0);" ng-click="searchSend()">确定</a>
		</div>
        <div style="padding:20px;">  
            <table class="tab_table search_table" style="clear:both;">
            	<tr>
                    <td class="t_title_long">出库单号：</td>
                    <td>
                        <input type="text" id="out_id" value="" />
                    </td>
                </tr>
                <tr>
                    <td class="t_title_long">订单号：</td>
                    <td>
                        <input type="text" id="refer_id" value="" />
                    </td>
                </tr>
            </table>
    	</div>        
	</div>
    <div class="cover" ng-if="showSearchFlag" ng-click="closeSearch()"></div>
    <!--筛选弹出-->
	
</div>